<div class="fixed-bar">
	<form class="layui-form layui-form-pane fixed-bar-form" action="{:url()}" method="get" id="hisi-table-search" >
		<div class="layui-form-item">
			<div class="layui-inline">
				<label class="layui-form-label">订单号</label>
				<div class="layui-input-inline">
					<input type="text" name="client_ordernum" lay-verify="" placeholder="输入订单号" class="layui-input">
				</div>
			</div>
            <div class="layui-inline">
				<label class="layui-form-label">物料名称</label>
				<div class="layui-input-inline">
					<input type="text" name="name" lay-verify="" placeholder="输入物料名称" class="layui-input">
				</div>
			</div>
            <div class="layui-inline">
				<label class="layui-form-label">打标时间</label>
				<div class="layui-input-inline">
                    
					<input type="text" name="caigou_confirm_time" readonly="" id="caigou_confirm_time" lay-verify="" placeholder="输入打标时间" class="layui-input">
				</div>
			</div>
			<div class="layui-inline">
				<button type="submit" class="layui-btn" lay-submit="" lay-filter="demo1" >搜索</button>
				<button type="button" class="layui-btn layui-btn-primary hisi-export">导出</button>
			</div>
		</div>
	</form>
</div>
<table id="dataTable"></table>

{include file="system@block/layui" /}


<script type="text/javascript">
    layui.use(['opTable','table','jquery', 'tool', 'form','laydate', 'layer'], function() {
        var $ = layui.jquery;
        var table = layui.table;
        var form = layui.form;
        var layer = layui.layer;
        var laydate = layui.laydate;
		form.render();
        
        laydate.render({
		    elem: '#caigou_confirm_time'
		    ,range: '~'
		    ,theme: 'molv'
		    ,mark: {'{:$today}':''}
	    	,change: function(value, date, endDate){
		    	$('#caigou_confirm_time').val(value);
            	$('#layui-laydate1').remove();//关闭面板
            }
		});
        
        table.render({
            elem: '#dataTable'
            ,url: "{:url()}?mid={:$mid}" //数据接口
            ,page: true //开启分页
            ,skin: 'row'
            ,even: true
            ,limit: 20
            ,limits: [20,50,100,150,200]
            ,text: {
                none : '暂无相关数据'
            }
            ,toolbar: false
            ,defaultToolbar: ['filter', 'exports', 'print']
            ,cols: [[ //表头
                {field: 'client_ordernum', title: '订单号',templet:function(d){return '<span class="copy-item">'+d.client_ordernum+'</span>';}}
                ,{field: 'tiaoshu', title: '打标条数'}
                ,{field: 'create_time', title: '打标时间',templet:function(d){return layui.util.toDateString(d.create_time * 1000) },width:200}
                ,{field: 'material_name', title: '物料名称',width:200}
                ,{field: 'is_from_stock_name', title: '是否库存'}
                ,{field: 'stalls_name', title: '档口'}
            ]]
        });
    });
</script>